﻿using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;

namespace TwitterComedy
{
	public sealed partial class Workflow1: SequentialWorkflowActivity
	{
		public Workflow1()
		{
			InitializeComponent();
		}



        private void codeActivity1_ExecuteCode(object sender, EventArgs e)
        {
            Console.WriteLine("Threre are {0} total Statii", mwinkleStatus.Count + scobleStatus.Count);
        }

        public static DependencyProperty mwinkleStatusProperty = DependencyProperty.Register("mwinkleStatus", typeof(System.Collections.Generic.IList<TwitterFlow.TwitterStatus>), typeof(TwitterComedy.Workflow1));

        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        [BrowsableAttribute(true)]
        [CategoryAttribute("output")]
        public System.Collections.Generic.IList<TwitterFlow.TwitterStatus> mwinkleStatus
        {
            get
            {
                return ((System.Collections.Generic.IList<TwitterFlow.TwitterStatus>)(base.GetValue(TwitterComedy.Workflow1.mwinkleStatusProperty)));
            }
            set
            {
                base.SetValue(TwitterComedy.Workflow1.mwinkleStatusProperty, value);
            }
        }

        public static DependencyProperty scobleStatusProperty = DependencyProperty.Register("scobleStatus", typeof(System.Collections.Generic.IList<TwitterFlow.TwitterStatus>), typeof(TwitterComedy.Workflow1));

        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        [BrowsableAttribute(true)]
        [CategoryAttribute("output")]
        public System.Collections.Generic.IList<TwitterFlow.TwitterStatus> scobleStatus
        {
            get
            {
                return ((System.Collections.Generic.IList<TwitterFlow.TwitterStatus>)(base.GetValue(TwitterComedy.Workflow1.scobleStatusProperty)));
            }
            set
            {
                base.SetValue(TwitterComedy.Workflow1.scobleStatusProperty, value);
            }
        }

        private void codeActivity2_ExecuteCode(object sender, EventArgs e)
        {
            Console.WriteLine("Couplet Size {0}", ComicCouplets.Count);
            foreach (TwitterFlow.ComicCouplet cc in ComicCouplets)
            {
                Console.WriteLine("One: {0}, {1} @ {2}", cc.One.User, cc.One.Status, cc.One.CreatedAt );
                Console.WriteLine("Two: {0}, {1} @ {2}", cc.Two.User, cc.Two.Status, cc.Two.CreatedAt);
            }
        }

        public static DependencyProperty ComicCoupletsProperty = DependencyProperty.Register("ComicCouplets", typeof(System.Collections.Generic.IList<TwitterFlow.ComicCouplet>), typeof(TwitterComedy.Workflow1));

        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        [BrowsableAttribute(true)]
        [CategoryAttribute("Output")]
        public System.Collections.Generic.IList<TwitterFlow.ComicCouplet> ComicCouplets
        {
            get
            {
                return ((System.Collections.Generic.IList<TwitterFlow.ComicCouplet>)(base.GetValue(TwitterComedy.Workflow1.ComicCoupletsProperty)));
            }
            set
            {
                base.SetValue(TwitterComedy.Workflow1.ComicCoupletsProperty, value);
            }
        }

       
	}

}
